﻿using Commons.Models.OperationsContext;
using Commons.Models.Locks;
using System.Collections.Generic;

namespace Commons.Services.Locks
{
	public interface ILockService
	{
		bool CheckLock(Lock lockObject);

		bool CheckLock(Lock lockObject, IOperationContext context);

		void ValidateLock(Lock lockObject, object obj, object action);

		void ValidateLock(Lock lockObject, object obj, object action, IOperationContext context);

		ICollection<int> GetEarlyUnlocks();

		void Unlock(int lockId);

		Lock GetLock(int lockId);
	}
}
